3.4.24 \(\int \frac {\text {sech}^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx\) [324]

3.4.24.1 Optimal result
3.4.24.2 Mathematica [A] (verified)
3.4.24.3 Rubi [A] (verified)
3.4.24.4 Maple [B] (verified)
3.4.24.5 Fricas [B] (verification not implemented)
3.4.24.6 Sympy [F]
3.4.24.7 Maxima [F(-2)]
3.4.24.8 Giac [F]
3.4.24.9 Mupad [B] (verification not implemented)

3.4.24.1 Optimal result

Integrand size = 23, antiderivative size = 60 \[ \int \frac {\text {sech}^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx=-\frac {b \text {arctanh}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} (a-b)^{3/2} d}+\frac {\tanh (c+d x)}{(a-b) d} \]

output
-b*arctanh((a-b)^(1/2)*tanh(d*x+c)/a^(1/2))/(a-b)^(3/2)/d/a^(1/2)+tanh(d*x 
+c)/(a-b)/d
 
3.4.24.2 Mathematica [A] (verified)

Time = 0.32 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.00 \[ \int \frac {\text {sech}^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx=-\frac {b \text {arctanh}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} (a-b)^{3/2} d}+\frac {\tanh (c+d x)}{(a-b) d} \]

input
Integrate[Sech[c + d*x]^2/(a + b*Sinh[c + d*x]^2),x]
 
output
-((b*ArcTanh[(Sqrt[a - b]*Tanh[c + d*x])/Sqrt[a]])/(Sqrt[a]*(a - b)^(3/2)* 
d)) + Tanh[c + d*x]/((a - b)*d)
 
3.4.24.3 Rubi [A] (verified)

Time = 0.26 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.97, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3042, 3670, 299, 221}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\text {sech}^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{\cos (i c+i d x)^2 \left (a-b \sin (i c+i d x)^2\right )}dx\)

\(\Big \downarrow \) 3670

\(\displaystyle \frac {\int \frac {1-\tanh ^2(c+d x)}{a-(a-b) \tanh ^2(c+d x)}d\tanh (c+d x)}{d}\)

\(\Big \downarrow \) 299

\(\displaystyle \frac {\frac {\tanh (c+d x)}{a-b}-\frac {b \int \frac {1}{a-(a-b) \tanh ^2(c+d x)}d\tanh (c+d x)}{a-b}}{d}\)

\(\Big \downarrow \) 221

\(\displaystyle \frac {\frac {\tanh (c+d x)}{a-b}-\frac {b \text {arctanh}\left (\frac {\sqrt {a-b} \tanh (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} (a-b)^{3/2}}}{d}\)

input
Int[Sech[c + d*x]^2/(a + b*Sinh[c + d*x]^2),x]
 
output
(-((b*ArcTanh[(Sqrt[a - b]*Tanh[c + d*x])/Sqrt[a]])/(Sqrt[a]*(a - b)^(3/2) 
)) + Tanh[c + d*x]/(a - b))/d
 

3.4.24.3.1 Defintions of rubi rules used

rule 221
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x 
/Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
 

rule 299
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] :> Simp[d*x 
*((a + b*x^2)^(p + 1)/(b*(2*p + 3))), x] - Simp[(a*d - b*c*(2*p + 3))/(b*(2 
*p + 3))   Int[(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - 
 a*d, 0] && NeQ[2*p + 3, 0]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3670
Int[cos[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^( 
p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff/f   Su 
bst[Int[(a + (a + b)*ff^2*x^2)^p/(1 + ff^2*x^2)^(m/2 + p + 1), x], x, Tan[e 
 + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2] && IntegerQ[p]
 
3.4.24.4 Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(194\) vs. \(2(52)=104\).

Time = 35.27 (sec) , antiderivative size = 195, normalized size of antiderivative = 3.25

method result size
risch \(-\frac {2}{d \left (a -b \right ) \left ({\mathrm e}^{2 d x +2 c}+1\right )}+\frac {b \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 a \sqrt {a^{2}-a b}-b \sqrt {a^{2}-a b}+2 a^{2}-2 a b}{b \sqrt {a^{2}-a b}}\right )}{2 \sqrt {a^{2}-a b}\, \left (a -b \right ) d}-\frac {b \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 a \sqrt {a^{2}-a b}-b \sqrt {a^{2}-a b}-2 a^{2}+2 a b}{b \sqrt {a^{2}-a b}}\right )}{2 \sqrt {a^{2}-a b}\, \left (a -b \right ) d}\) \(195\)
derivativedivides \(\frac {\frac {2 b a \left (\frac {\left (\sqrt {-b \left (a -b \right )}+b \right ) \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}-\frac {\left (\sqrt {-b \left (a -b \right )}-b \right ) \operatorname {arctanh}\left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{a -b}+\frac {2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\left (a -b \right ) \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right )}}{d}\) \(219\)
default \(\frac {\frac {2 b a \left (\frac {\left (\sqrt {-b \left (a -b \right )}+b \right ) \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}-a +2 b \right ) a}}-\frac {\left (\sqrt {-b \left (a -b \right )}-b \right ) \operatorname {arctanh}\left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{2 a \sqrt {-b \left (a -b \right )}\, \sqrt {\left (2 \sqrt {-b \left (a -b \right )}+a -2 b \right ) a}}\right )}{a -b}+\frac {2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\left (a -b \right ) \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right )}}{d}\) \(219\)

input
int(sech(d*x+c)^2/(a+b*sinh(d*x+c)^2),x,method=_RETURNVERBOSE)
 
output
-2/d/(a-b)/(exp(2*d*x+2*c)+1)+1/2/(a^2-a*b)^(1/2)*b/(a-b)/d*ln(exp(2*d*x+2 
*c)+(2*a*(a^2-a*b)^(1/2)-b*(a^2-a*b)^(1/2)+2*a^2-2*a*b)/b/(a^2-a*b)^(1/2)) 
-1/2/(a^2-a*b)^(1/2)*b/(a-b)/d*ln(exp(2*d*x+2*c)+(2*a*(a^2-a*b)^(1/2)-b*(a 
^2-a*b)^(1/2)-2*a^2+2*a*b)/b/(a^2-a*b)^(1/2))
 
3.4.24.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 226 vs. \(2 (52) = 104\).

Time = 0.32 (sec) , antiderivative size = 709, normalized size of antiderivative = 11.82 \[ \int \frac {\text {sech}^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx=\left [-\frac {{\left (b \cosh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b \sinh \left (d x + c\right )^{2} + b\right )} \sqrt {a^{2} - a b} \log \left (\frac {b^{2} \cosh \left (d x + c\right )^{4} + 4 \, b^{2} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + b^{2} \sinh \left (d x + c\right )^{4} + 2 \, {\left (2 \, a b - b^{2}\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, b^{2} \cosh \left (d x + c\right )^{2} + 2 \, a b - b^{2}\right )} \sinh \left (d x + c\right )^{2} + 8 \, a^{2} - 8 \, a b + b^{2} + 4 \, {\left (b^{2} \cosh \left (d x + c\right )^{3} + {\left (2 \, a b - b^{2}\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) - 4 \, {\left (b \cosh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b \sinh \left (d x + c\right )^{2} + 2 \, a - b\right )} \sqrt {a^{2} - a b}}{b \cosh \left (d x + c\right )^{4} + 4 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{3} + b \sinh \left (d x + c\right )^{4} + 2 \, {\left (2 \, a - b\right )} \cosh \left (d x + c\right )^{2} + 2 \, {\left (3 \, b \cosh \left (d x + c\right )^{2} + 2 \, a - b\right )} \sinh \left (d x + c\right )^{2} + 4 \, {\left (b \cosh \left (d x + c\right )^{3} + {\left (2 \, a - b\right )} \cosh \left (d x + c\right )\right )} \sinh \left (d x + c\right ) + b}\right ) + 4 \, a^{2} - 4 \, a b}{2 \, {\left ({\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} d \cosh \left (d x + c\right )^{2} + 2 \, {\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} d \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} d \sinh \left (d x + c\right )^{2} + {\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} d\right )}}, \frac {{\left (b \cosh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b \sinh \left (d x + c\right )^{2} + b\right )} \sqrt {-a^{2} + a b} \arctan \left (-\frac {{\left (b \cosh \left (d x + c\right )^{2} + 2 \, b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b \sinh \left (d x + c\right )^{2} + 2 \, a - b\right )} \sqrt {-a^{2} + a b}}{2 \, {\left (a^{2} - a b\right )}}\right ) - 2 \, a^{2} + 2 \, a b}{{\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} d \cosh \left (d x + c\right )^{2} + 2 \, {\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} d \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} d \sinh \left (d x + c\right )^{2} + {\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} d}\right ] \]

input
integrate(sech(d*x+c)^2/(a+b*sinh(d*x+c)^2),x, algorithm="fricas")
 
output
[-1/2*((b*cosh(d*x + c)^2 + 2*b*cosh(d*x + c)*sinh(d*x + c) + b*sinh(d*x + 
 c)^2 + b)*sqrt(a^2 - a*b)*log((b^2*cosh(d*x + c)^4 + 4*b^2*cosh(d*x + c)* 
sinh(d*x + c)^3 + b^2*sinh(d*x + c)^4 + 2*(2*a*b - b^2)*cosh(d*x + c)^2 + 
2*(3*b^2*cosh(d*x + c)^2 + 2*a*b - b^2)*sinh(d*x + c)^2 + 8*a^2 - 8*a*b + 
b^2 + 4*(b^2*cosh(d*x + c)^3 + (2*a*b - b^2)*cosh(d*x + c))*sinh(d*x + c) 
- 4*(b*cosh(d*x + c)^2 + 2*b*cosh(d*x + c)*sinh(d*x + c) + b*sinh(d*x + c) 
^2 + 2*a - b)*sqrt(a^2 - a*b))/(b*cosh(d*x + c)^4 + 4*b*cosh(d*x + c)*sinh 
(d*x + c)^3 + b*sinh(d*x + c)^4 + 2*(2*a - b)*cosh(d*x + c)^2 + 2*(3*b*cos 
h(d*x + c)^2 + 2*a - b)*sinh(d*x + c)^2 + 4*(b*cosh(d*x + c)^3 + (2*a - b) 
*cosh(d*x + c))*sinh(d*x + c) + b)) + 4*a^2 - 4*a*b)/((a^3 - 2*a^2*b + a*b 
^2)*d*cosh(d*x + c)^2 + 2*(a^3 - 2*a^2*b + a*b^2)*d*cosh(d*x + c)*sinh(d*x 
 + c) + (a^3 - 2*a^2*b + a*b^2)*d*sinh(d*x + c)^2 + (a^3 - 2*a^2*b + a*b^2 
)*d), ((b*cosh(d*x + c)^2 + 2*b*cosh(d*x + c)*sinh(d*x + c) + b*sinh(d*x + 
 c)^2 + b)*sqrt(-a^2 + a*b)*arctan(-1/2*(b*cosh(d*x + c)^2 + 2*b*cosh(d*x 
+ c)*sinh(d*x + c) + b*sinh(d*x + c)^2 + 2*a - b)*sqrt(-a^2 + a*b)/(a^2 - 
a*b)) - 2*a^2 + 2*a*b)/((a^3 - 2*a^2*b + a*b^2)*d*cosh(d*x + c)^2 + 2*(a^3 
 - 2*a^2*b + a*b^2)*d*cosh(d*x + c)*sinh(d*x + c) + (a^3 - 2*a^2*b + a*b^2 
)*d*sinh(d*x + c)^2 + (a^3 - 2*a^2*b + a*b^2)*d)]
 
3.4.24.6 Sympy [F]

\[ \int \frac {\text {sech}^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx=\int \frac {\operatorname {sech}^{2}{\left (c + d x \right )}}{a + b \sinh ^{2}{\left (c + d x \right )}}\, dx \]

input
integrate(sech(d*x+c)**2/(a+b*sinh(d*x+c)**2),x)
 
output
Integral(sech(c + d*x)**2/(a + b*sinh(c + d*x)**2), x)
 
3.4.24.7 Maxima [F(-2)]

Exception generated. \[ \int \frac {\text {sech}^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx=\text {Exception raised: ValueError} \]

input
integrate(sech(d*x+c)^2/(a+b*sinh(d*x+c)^2),x, algorithm="maxima")
 
output
Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(b-a>0)', see `assume?` for more 
details)Is
 
3.4.24.8 Giac [F]

\[ \int \frac {\text {sech}^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx=\int { \frac {\operatorname {sech}\left (d x + c\right )^{2}}{b \sinh \left (d x + c\right )^{2} + a} \,d x } \]

input
integrate(sech(d*x+c)^2/(a+b*sinh(d*x+c)^2),x, algorithm="giac")
 
output
sage0*x
 
3.4.24.9 Mupad [B] (verification not implemented)

Time = 2.36 (sec) , antiderivative size = 265, normalized size of antiderivative = 4.42 \[ \int \frac {\text {sech}^2(c+d x)}{a+b \sinh ^2(c+d x)} \, dx=\frac {b\,\ln \left (\frac {4\,\left (2\,a\,b-b^2+8\,a^2\,{\mathrm {e}}^{2\,c+2\,d\,x}+b^2\,{\mathrm {e}}^{2\,c+2\,d\,x}-8\,a\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{a\,{\left (a-b\right )}^3}-\frac {8\,b+32\,a\,{\mathrm {e}}^{2\,c+2\,d\,x}-16\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}}{\sqrt {a}\,{\left (a-b\right )}^{5/2}}\right )}{2\,\sqrt {a}\,d\,{\left (a-b\right )}^{3/2}}-\frac {b\,\ln \left (\frac {8\,b+32\,a\,{\mathrm {e}}^{2\,c+2\,d\,x}-16\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}}{\sqrt {a}\,{\left (a-b\right )}^{5/2}}+\frac {4\,\left (2\,a\,b-b^2+8\,a^2\,{\mathrm {e}}^{2\,c+2\,d\,x}+b^2\,{\mathrm {e}}^{2\,c+2\,d\,x}-8\,a\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{a\,{\left (a-b\right )}^3}\right )}{2\,\sqrt {a}\,d\,{\left (a-b\right )}^{3/2}}-\frac {2}{\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )\,\left (a\,d-b\,d\right )} \]

input
int(1/(cosh(c + d*x)^2*(a + b*sinh(c + d*x)^2)),x)
 
output
(b*log((4*(2*a*b - b^2 + 8*a^2*exp(2*c + 2*d*x) + b^2*exp(2*c + 2*d*x) - 8 
*a*b*exp(2*c + 2*d*x)))/(a*(a - b)^3) - (8*b + 32*a*exp(2*c + 2*d*x) - 16* 
b*exp(2*c + 2*d*x))/(a^(1/2)*(a - b)^(5/2))))/(2*a^(1/2)*d*(a - b)^(3/2)) 
- (b*log((8*b + 32*a*exp(2*c + 2*d*x) - 16*b*exp(2*c + 2*d*x))/(a^(1/2)*(a 
 - b)^(5/2)) + (4*(2*a*b - b^2 + 8*a^2*exp(2*c + 2*d*x) + b^2*exp(2*c + 2* 
d*x) - 8*a*b*exp(2*c + 2*d*x)))/(a*(a - b)^3)))/(2*a^(1/2)*d*(a - b)^(3/2) 
) - 2/((exp(2*c + 2*d*x) + 1)*(a*d - b*d))